main() {
  Student student = Student("张三", 18);
  student.study();
  student.teach();
}

//定义一个父类
class Person {
  String name;
  int age;
  Person(this.name, this.age);
}


//定义一个子类,继承父类，同时使用with混入多个mixin类
class Student extends Person with Study, Teach {
  Student(super.name, super.age);
}

//定义mixin类
mixin Study {
  void study() {
    print("学生正在学习");
  }
}

//定义mixin类
mixin Teach {
  void teach() {
    print("老师正在教学");
  }
}